<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <g:set var="entityName" value="${message(code: 'estate.label', default: 'Estate')}" />
    <title>应收账款押品详情</title>
    <asset:stylesheet src="intelligence/swiper.css"/>
    <style>
    .contact-stat{
        padding: 8px 0px;
        text-align: center;
    }
    .contact-stat span{
        font-size: 13px;
        color: #88898c;
        margin-bottom: 10px;
    }
    .contact-stat strong{
        font-size: 13px;
        word-wrap: break-word;
    }
    .nav-tabs{
        border-bottom: none;
    }
    .hpanel > .panel-footer, .hpanel > .panel-section{
        background: #f9f9f9;
    }
    .flex{
        display: flex;justify-content: center;align-items: center;
    }
    .newFontSize{
        font-size: 12px;
    }
    table>tbody>tr>td, table>tbody>tr>th,.table>tfoot>tr>td, table>tfoot>tr>th, table>thead>tr>td, table>thead>tr>th{
        padding: 8px;
        line-height: 1.42857143;
        white-space: nowrap;
    }
    /*轮播图样式*/
    .swiper-container{
        width: 100%;
        height: 300px;
        margin-top: 10px;
    }
    .swiper-pagination-bullet-active{
        opacity: 0.6;
        background: #fff;
    }
    @media (max-width:1654px){
        #screenPage,#screenPage_1{
            height:162px;
        }
    }
    @media (max-width:1382px){
        #screenPage_2{
            height:477px;
        }
    }
    </style>
</head>
<body class="fixed-navbar fixed-sidebar">

<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right navFloatRight">
                <ol class="hbreadcrumb breadcrumb">
                    <li>
                        <span>CINDATA PLS</span>
                    </li>
                    <li>
                        <g:link action="index">
                            <span>应收账款</span>
                        </g:link>
                    </li>
                    <li class="active">
                        <span>应收账款详情</span>
                    </li>
                </ol>
            </div>
        </div>
    </div>
</div>

<div class="content animate-panel">

    %{--押品信息--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                押品信息
            </div>

            <div class="panel-body">
                <div class="col-md-12 text-center">
                    <div class="col-md-3">
                        <h3 class="font-extra-bold m-b-xs text-center">
                            <small style="font-size: 16px;">最新评估价值 :</small>
                            <span class="totalPrice">${this.collateral?.totalPrice}</span>
                            <small class="newFontSize">万元</small>
                        </h3>
                    </div>
                    <div class="col-md-3">
                        <h3 class="font-extra-bold m-b-xs">
                            <small style="font-size: 16px;">抵质押率 : </small>
                            ${this.accountsReceivable?.ltv}%
                            <small class="newFontSize"></small>
                        </h3>
                    </div>
                    <div class="col-md-3">
                        <h3 class="font-extra-bold m-b-xs">
                            <small style="font-size: 16px;">变现能力 : </small>
                            ${this.accountsReceivable?.cashability?.name}
                            <small class="newFontSize"></small>
                        </h3>
                    </div>
                    <div class="col-md-3">
                        <h3 class="font-extra-bold m-b-xs text-center">
                            <small style="font-size: 16px;">押品风险 : </small>
                            <g:if test="${accountsReceivable?.cltv>=0&&accountsReceivable?.cltv<=0.6}"><span style="color: #62CB31">低</span></g:if>
                            <g:if test="${accountsReceivable?.cltv>0.6&&accountsReceivable?.cltv<=0.8}"><span style="color: #FF9800">中</span></g:if>
                            <g:if test="${accountsReceivable?.cltv>0.8&&accountsReceivable?.cltv<=1}"><span style="color: #E51C23">高</span></g:if>
                            <g:if test="${accountsReceivable?.cltv>1}"><span style="color: #8B1818">损失</span></g:if></h4>
                        </h3>
                    </div>
                </div>
            </div>
            <div class="panel-footer contact-footer">
                <div class="row">
                    <div class="col-md-2">
                        <div class="contact-stat">
                            <span>押品编号</span>
                            <strong>${this.accountsReceivable?.externalId}</strong>
                        </div>
                    </div>

                    <div class="col-md-2">
                        <div class="contact-stat">
                            <span>质押品类型</span>
                            <strong>${this.accountsReceivable?.type?.name}</strong>
                        </div>
                    </div>

                    <div class="col-md-2">

                        <h3 class="contact-stat">
                            <span>出质人名称</span>
                            <strong>${this.accountsReceivable?.fullName}</strong>
                        </h3>
                    </div>

                    <div class="col-md-2">
                        <h3 class="contact-stat">
                            <span>金额</span>
                            <strong>${this.accountsReceivable?.currency?.name}：${this.accountsReceivable?.amount}</strong>
                        </h3>
                    </div>
                    <div class="col-md-2">
                        <h3 class="contact-stat">
                            <span>押品状态</span>
                            <strong>${this.accountsReceivable?.estateStatus?.name}</strong>

                        </h3>
                    </div>

                    <div class="col-md-2">
                        <div class="contact-stat">
                            <span>城市/行政区</span>
                            <strong>${this.accountsReceivable?.city?.name}</strong>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    %{--质押品信息--}%
    <g:if test="${accountsReceivable?.type?.name == '交易类应收账款' || accountsReceivable?.type?.name == '其他类应收账款'}">
        <div class="row">
            <div class="hpanel hgreen" style="">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    </div>
                    押品详细信息
                </div>

                <div class="panel-body no-padding" style="overflow-x:scroll;">
                    <table class="table table-striped table-bordered table-hover text-center">
                        <thead>
                        <tr>
                            <th>质押物编号</th>
                            <th>质押物类型</th>
                            <th>质押物名称</th>
                            <th>出质人名称</th>
                            <th>出质人证件类型</th>
                            <th>出质人证件号码</th>
                            <th>出质人贷款卡编号</th>
                            <th>其他共同所有人</th>
                            <th>所占份额</th>
                            <th>卖方信用评级机构</th>
                            <th>卖方信用评级结果</th>
                            <th>买方信用评级机构</th>
                            <th>买方信用评级结果</th>
                            <th>账龄</th>
                            <th>应收账款金额</th>
                            <th>发票原有金额（新增）</th>
                            <th>发票实有金额（新增）</th>
                            <th>应收帐款到期日（新增）</th>
                            <th>应收账款还款日期</th>
                            <th>是否有追索权</th>
                            <th>宽限期（天）</th>
                            <th>买方名称（新增）</th>
                            <th>商品名称（新增）</th>
                            <th>商品数量（新增）</th>
                            <th>买方开户行（新增）</th>
                            <th>买方银行帐号（新增）</th>
                            <th>买方联系人（新增）</th>
                            <th>买方联系电话（新增）</th>
                            <th>币种</th>
                            <th>发票号</th>
                            <th>变现能力</th>
                            <th>价值波动性</th>
                            <th>查封便利性</th>
                            <th>抵质押物与借款人相关性</th>
                            <th>法律有效性</th>
                            <th>初次认定价值</th>
                            <th>最新认定价值</th>
                            <th>最新认定日期</th>
                            <th>实际抵质押率</th>
                            <th>抵质押率上限</th>
                            <th>抵质押物说明(限100个汉字)</th>
                            <th>登记人</th>
                            <th>登记机构</th>
                            <th>登记日期</th>
                            <th>更新日期</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>${this?.accountsReceivable?.externalId}</td>
                            <td>${this.accountsReceivable?.type?.name}</td>
                            <td>${this.accountsReceivable?.name}</td>
                            <td>${this.accountsReceivable?.fullName}</td>
                            <td>${this.accountsReceivable?.identityType?.name}</td>
                            <td>${this.accountsReceivable?.idNumber}</td>
                            <td>${this.accountsReceivable?.loanCardNumber}</td>
                            <td>${this.accountsReceivable?.commonOwnerFullName}</td>
                            <td>${this.accountsReceivable?.sharePoint}</td>
                            <td>${this.accountsReceivable?.sellerCreditRatingOrg}</td>
                            <td>${this.accountsReceivable?.sellerCreditRatingResults}</td>
                            <td>${this.accountsReceivable?.buyerCreditRatingOrg}</td>
                            <td>${this.accountsReceivable?.buyerCreditRatingResults}</td>
                            <td>${this.accountsReceivable?.duration}</td>
                            <td>${this.accountsReceivable?.amount}</td>
                            <td>${this.accountsReceivable?.invoiceOriginalAmount}</td>
                            <td>${this.accountsReceivable?.invoiceActualAmount}</td>
                            <td>${this.accountsReceivable?.endDate}</td>
                            <td>${this.accountsReceivable?.repaymentDate}</td>
                            <td>${this.accountsReceivable?.rightOfRecourse}</td>
                            <td>${this.accountsReceivable?.gracePeriod}</td>
                            <td>${this.accountsReceivable?.buyerFullName}</td>
                            <td>${this.accountsReceivable?.productName}</td>
                            <td>${this.accountsReceivable?.productAmount}</td>
                            <td>${this.accountsReceivable?.buyerOpeningBank}</td>
                            <td>${this.accountsReceivable?.buyerBankAccount}</td>
                            <td>${this.accountsReceivable?.buyerContact}</td>
                            <td>${this.accountsReceivable?.buyerCellphone}</td>
                            <td>${this.accountsReceivable?.currency?.name}</td>
                            <td>${this.accountsReceivable?.invoiceNumber}</td>
                            <td>${this.accountsReceivable?.cashability?.name}</td>
                            <td>${this.accountsReceivable?.valueVolatility}</td>
                            <td>${this.accountsReceivable?.seizureOfConvenience}</td>
                            <td>${this.accountsReceivable?.relationOfMortgagor}</td>
                            <td>${this.accountsReceivable?.legalValidity}</td>
                            <td>${this.accountsReceivable?.firstEvaluatePrice}</td>
                            <td>${this.accountsReceivable?.latestEvaluatePrice}</td>
                            <td>${this.accountsReceivable?.latestEvaluateDate}</td>
                            <td>${this.accountsReceivable?.actualMortgageRate}</td>
                            <td>${this.accountsReceivable?.mortgageRateUpperLimit}</td>
                            <td>${this.accountsReceivable?.description}</td>
                            <td>${this.accountsReceivable?.registerFullName}</td>
                            <td>${this.accountsReceivable?.registerAccount}</td>
                            <td>${this.accountsReceivable?.registerDate}</td>
                            <td>${this.accountsReceivable?.registerUpdateDate}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </g:if>
    <g:if test="${accountsReceivable?.type?.name == '道路收费权'}">
        <div class="row">
            <div class="hpanel hgreen" style="">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    </div>
                    押品详细信息
                </div>

                <div class="panel-body no-padding" style="overflow-x:scroll;">
                    <table class="table table-striped table-bordered table-hover text-center">
                        <thead>
                        <tr>
                            <th>质押物编号</th>
                            <th>质押物类型</th>
                            <th>质押物名称</th>
                            <th>出质人名称</th>
                            <th>出质人证件类型</th>
                            <th>出质人证件号码</th>
                            <th>出质人贷款卡编号</th>
                            <th>其他共同所有人</th>
                            <th>所占份额</th>
                            <th>币种</th>
                            <th>收费权质押批文单位</th>
                            <th>收费权质押批文号</th>
                            <th>收费还贷比例</th>
                            <th>归集账号</th>
                            <th>开户行</th>
                            <th>收费权现金流分析</th>
                            <th>权利人信用评级机构</th>
                            <th>权利人信用评级结果</th>
                            <th>变现能力</th>
                            <th>价值波动性</th>
                            <th>查封便利性</th>
                            <th>抵质押物与借款人相关性</th>
                            <th>法律有效性</th>
                            <th>担保价值</th>
                            <th>初次认定价值</th>
                            <th>最新认定价值</th>
                            <th>最新认定日期</th>
                            <th>实际抵质押率</th>
                            <th>抵质押率上限</th>
                            <th>抵质押物说明(限100个汉字)</th>
                            <th>登记人</th>
                            <th>登记机构</th>
                            <th>登记日期</th>
                            <th>更新日期</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>${this?.accountsReceivable?.externalId}</td>
                            <td>${this.accountsReceivable?.type?.name}</td>
                            <td>${this.accountsReceivable?.name}</td>
                            <td>${this.accountsReceivable?.fullName}</td>
                            <td>${this.accountsReceivable?.identityType?.name}</td>
                            <td>${this.accountsReceivable?.idNumber}</td>
                            <td>${this.accountsReceivable?.loanCardNumber}</td>
                            <td>${this.accountsReceivable?.commonOwnerFullName}</td>
                            <td>${this.accountsReceivable?.sharePoint}</td>
                            <td>${this.accountsReceivable?.currency?.name}</td>
                            <td>${this.accountsReceivable?.unit}</td>
                            <td>${this.accountsReceivable?.number}</td>
                            <td>${this.accountsReceivable?.repaymentRatio}</td>
                            <td>${this.accountsReceivable?.accountNumber}</td>
                            <td>${this.accountsReceivable?.openingBank}</td>
                            <td>${this.accountsReceivable?.cashFlowAnalysis}</td>
                            <td>${this.accountsReceivable?.creditRatingAgency}</td>
                            <td>${this.accountsReceivable?.creditRatingResults}</td>
                            <td>${this.accountsReceivable?.cashability?.name}</td>
                            <td>${this.accountsReceivable?.valueVolatility}</td>
                            <td>${this.accountsReceivable?.seizureOfConvenience}</td>
                            <td>${this.accountsReceivable?.relationOfMortgagor}</td>
                            <td>${this.accountsReceivable?.legalValidity}</td>
                            <td>${this.accountsReceivable?.guaranteeValue}</td>
                            <td>${this.accountsReceivable?.firstEvaluatePrice}</td>
                            <td>${this.accountsReceivable?.latestEvaluatePrice}</td>
                            <td>${this.accountsReceivable?.latestEvaluateDate}</td>
                            <td>${this.accountsReceivable?.actualMortgageRate}</td>
                            <td>${this.accountsReceivable?.mortgageRateUpperLimit}</td>
                            <td>${this.accountsReceivable?.description}</td>
                            <td>${this.accountsReceivable?.registerFullName}</td>
                            <td>${this.accountsReceivable?.registerAccount}</td>
                            <td>${this.accountsReceivable?.registerDate}</td>
                            <td>${this.accountsReceivable?.registerUpdateDate}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </g:if>
    <g:if test="${accountsReceivable?.type?.name == '出口退税专用账户'}">
        <div class="row">
            <div class="hpanel hgreen" style="">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    </div>
                    押品详细信息
                </div>

                <div class="panel-body no-padding" style="overflow-x:scroll;">
                    <table class="table table-striped table-bordered table-hover text-center">
                        <thead>
                        <tr>
                            <th>质押物编号</th>
                            <th>质押物类型</th>
                            <th>质押物名称</th>
                            <th>出质人名称</th>
                            <th>出质人证件类型</th>
                            <th>出质人证件号码</th>
                            <th>出质人贷款卡编号</th>
                            <th>其他共同所有人</th>
                            <th>所占份额</th>
                            <th>币种</th>
                            <th>账户权属人名称</th>
                            <th>账户权属人证件类型</th>
                            <th>账户权属人证件号码</th>
                            <th>退税专户账号</th>
                            <th>未退税额</th>
                            <th>未退税额确认日期</th>
                            <th>未退税额确认机构</th>
                            <th>退税日期</th>
                            <th>账户权属人信用评级机构</th>
                            <th>账户权属人信用评级结果</th>
                            <th>变现能力</th>
                            <th>价值波动性</th>
                            <th>查封便利性</th>
                            <th>抵质押物与借款人相关性</th>
                            <th>法律有效性</th>
                            <th>担保价值</th>
                            <th>初次认定价值</th>
                            <th>最新认定价值</th>
                            <th>最新认定日期</th>
                            <th>实际抵质押率</th>
                            <th>抵质押率上限</th>
                            <th>抵质押物说明(限100个汉字)</th>
                            <th>登记人</th>
                            <th>登记机构</th>
                            <th>登记日期</th>
                            <th>更新日期</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>${this?.accountsReceivable?.externalId}</td>
                            <td>${this.accountsReceivable?.type?.name}</td>
                            <td>${this.accountsReceivable?.name}</td>
                            <td>${this.accountsReceivable?.fullName}</td>
                            <td>${this.accountsReceivable?.identityType?.name}</td>
                            <td>${this.accountsReceivable?.idNumber}</td>
                            <td>${this.accountsReceivable?.loanCardNumber}</td>
                            <td>${this.accountsReceivable?.commonOwnerFullName}</td>
                            <td>${this.accountsReceivable?.sharePoint}</td>
                            <td>${this.accountsReceivable?.currency?.name}</td>
                            <td>${this.accountsReceivable?.ownerFullName}</td>
                            <td>${this.accountsReceivable?.ownerIdentityType?.name}</td>
                            <td>${this.accountsReceivable?.ownerIdNumber}</td>
                            <td>${this.accountsReceivable?.taxRefundAccount}</td>
                            <td>${this.accountsReceivable?.untaxRefundAmount}</td>
                            <td>${this.accountsReceivable?.untaxRefundConfirmDate}</td>
                            <td>${this.accountsReceivable?.untaxRefundConfirmAccount}</td>
                            <td>${this.accountsReceivable?.taxRefundDate}</td>
                            <td>${this.accountsReceivable?.creditRatingAgency}</td>
                            <td>${this.accountsReceivable?.creditRatingResults}</td>
                            <td>${this.accountsReceivable?.cashability?.name}</td>
                            <td>${this.accountsReceivable?.valueVolatility}</td>
                            <td>${this.accountsReceivable?.seizureOfConvenience}</td>
                            <td>${this.accountsReceivable?.relationOfMortgagor}</td>
                            <td>${this.accountsReceivable?.legalValidity}</td>
                            <td>${this.accountsReceivable?.guaranteeValue}</td>
                            <td>${this.accountsReceivable?.firstEvaluatePrice}</td>
                            <td>${this.accountsReceivable?.latestEvaluatePrice}</td>
                            <td>${this.accountsReceivable?.latestEvaluateDate}</td>
                            <td>${this.accountsReceivable?.actualMortgageRate}</td>
                            <td>${this.accountsReceivable?.mortgageRateUpperLimit}</td>
                            <td>${this.accountsReceivable?.description}</td>
                            <td>${this.accountsReceivable?.registerFullName}</td>
                            <td>${this.accountsReceivable?.registerAccount}</td>
                            <td>${this.accountsReceivable?.registerDate}</td>
                            <td>${this.accountsReceivable?.registerUpdateDate}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </g:if>
    %{--贷款信息--}%
    <div class="row">
        <div class="hpanel hgreen" style="">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                贷款信息
            </div>

            <div class="panel-body no-padding" style="overflow-x:scroll;">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <th>贷款编号</th>
                        <th>贷款余额</th>
                        <th>贷款总额</th>
                        <th>成交总价</th>
                        <th>回收总本金</th>
                        <th>回收总利息</th>
                        <th>回收总罚息</th>
                        <th>当前还款状态</th>
                        <th>逾期期数</th>
                        <th>质押权人</th>
                        <th>担保机构</th>
                        <th>放款银行</th>
                        <th>贷款时评估总价</th>
                        <th>贷款时评估单价</th>
                        <th>贷款到期日</th>
                        <th>贷款放款日</th>
                        <th>剩余还款总期数</th>
                        <th>还款方式</th>
                        <th>抵质押率</th>
                    </tr>
                    </thead>
                    <tbody>
                    <g:each in="${mortgageList}">
                        <tr>
                            <td ><g:link class="firstTd" style="color: #3498DB" action="show" controller="mortgage" id="${it?.id}">${it?.serialNumber?it?.serialNumber:'-'}</g:link></td>
                            <td>${it?.loansBalance?it?.loansBalance:'-'}元</td>
                            <td>${it?.loansAmount?it?.loansAmount:'-'}元</td>
                            <td>
                                <g:if test="${it?.loansEvaluateTotalPrice}">
                                    ${com.cindata.NumberUtil.GetFixedNumber(it?.loansEvaluateTotalPrice/10000)}（万元）
                                </g:if>
                                <g:else>
                                    -
                                </g:else>
                            </td>
                            <td>${it?.curRecycleTotalCapital?it?.curRecycleTotalCapital:'-'}元</td>
                            <td>${it?.curRecycleTotalInterest?it?.curRecycleTotalInterest:'-'}元</td>
                            <td>${it?.curRecycleTotalFine?it?.curRecycleTotalFine:'-'}元</td>
                            <td>${it?.curRepaymentState?it?.curRepaymentState.name:'-'}</td>
                            <td>${it?.curOverdueDuration?it?.curOverdueDuration:'-'}</td>
                            <td>${it?.mortgageeName?it?.mortgageeName:'-'}</td>
                            <td>${it?.guaranteeInstitution?it?.guaranteeInstitution.name:'-'}</td>
                            <td>${it?.loansBankName?it?.loansBankName:'-'}</td>
                            <td>${it?.loansEvaluateTotalPrice?it?.loansEvaluateTotalPrice:'-'}元</td>
                            <td>${it?.loansEvaluatePrice?it?.loansEvaluatePrice:'-'}元</td>
                            <td>
                                <g:if test="${it?.endDate}">
                                    <g:formatDate date="${it?.endDate}" format="yyyy-MM-dd"></g:formatDate>
                                </g:if>
                                <g:else>
                                    -
                                </g:else>
                            </td>
                            <td>
                                <g:if test="${it?.startDate}">
                                    <g:formatDate date="${it?.startDate}" format="yyyy-MM-dd"></g:formatDate>
                                </g:if>
                                <g:else>
                                    -
                                </g:else>
                            </td>
                            <td>${it?.remainTime?it?.remainTime:'-'}月</td>
                            <td>${it?.curRepaymentMode?it?.curRepaymentMode.name:'-'}</td>
                            <td>${it?.ltv?it?.ltv:'-'}%</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>

        </div>
    </div>
</div>

</div>
<asset:javascript src="intelligence/swiper.js"/>
<script>
    //    $('#goBack').click(function(){
    //        window.history.back(-1);
    //    })
    var riskText=$('.risk').text();
    if(riskText=='低风险>>'){
        $('.risk').css('color','#62CB31');
    }else if(riskText=='中风险>>'){
        $('.risk').css('color','#FF9800');
    }
    else if(riskText=='高风险>>'){
        $('.risk').css('color','#E51C23');
    }else{
        $('.risk').css('color','#3498DB');
    }


</script>

</body>
</html>
